//
//  BMSUserSourceModel.m
//  WDBMS
//
//  Created by YeJary on 2025/5/13.
//

#import "BMSUserSourceModel.h"

@implementation BMSUserSourceModel

+ (instancetype)modelWithDictionary:(NSDictionary *)dict {
    BMSUserSourceModel *model = [[BMSUserSourceModel alloc] init];
    model.source = dict[@"source"] ?: @"";
    model.planId = [dict[@"plan_id"] description] ?: @"";
    model.activeTime = [dict[@"active_time"] doubleValue];
    model.activeDate = dict[@"active_date"] ?: @"";
    model.advertiserId = [dict[@"advertiser_id"] description] ?: @"";
    model.aidId = [dict[@"aid_id"] description] ?: @"";
    model.campaignId = [dict[@"campaign_id"] description] ?: @"";
    return model;
}

- (BOOL)isAdUser {
    return [self.source isEqualToString:@"ad"];
}

@end
